package Data;

import java.util.*;

public class mac {

  public static void main(String[] args) {

    new TreeMap<>();
    new HashMap<>();
    new Hashtable<>();
    new HashSet<>();
    new ArrayList<>();
    new LinkedList<>();
    int num[] = {1,2,3,4,5,6,7,8};

    Arrays.sort(num);

    int k = 5;
   for (int i = num.length-k;i<num.length;i++){
     System.out.println(num[i]);
   }
  }
}
